home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 2000 February
/
Macworld (2000-02).dmg
/
Shareware World
/
Comms & Internet
/
Flex-Able 1.0
/
.admin
/
pass.able
< prev
next >
Wrap
Text File
|
1999-08-28
|
2KB
|
112 lines
<html>
<head>
<link rel=stylesheet type="text/css" HREF="faadmin.css">
<title>Flex-Able: Site Administration: Administrator Passwords</title>
</head>
<body>
<DIV CLASS="topic"></DIV>
<p><br>
<p><br>
<:set admins <:use_settings "/.admin/pass">>
<:set form <:read_form>>
<!--
if the admin password area is blank, then create the
right kind of object to go there
-->
<:ifempty admins>
<:set admins <:new "ASOC">>
<:/ifempty>
<!-- do authorization -->
<:ifequal <:size_of admins> 0>
<!-- No administrators configured. -->
<:set ok 1>
<:else>
<:require env["REMOTE_USER"]>
<:ifequal env["REMOTE_PASSWORD"] admins[env["REMOTE_USER"]]>
<!-- access is OK -->
<:set ok 1>
<:else>
<:set ok 0>
<:request_credentials "SITE_ADMIN">
<:/ifequal>
<:else>
<:set ok 0>
<:request_credentials "SITE_ADMIN">
<:/require>
<:/ifequal>
<:ifequal ok 1>
<!--
Check to see if we have a new administrator to add to the list.
-->
<:require form["$newname"] form["$newpass"]>
<:set admins[form["$newname"]] form["$newpass"]>
<:/require>
<!--
Any passwords that are different, change.
-->
<:foreach user pass form>
<:ifempty admins[user]>
<!-- do nothing -->
<:else>
<:set admins[user] pass>
<:/ifempty>
<:/foreach>
<!--
Any passwords to be deleted, delete
-->
<:foreach index user form["Delete"]>
<:set admins[user]>
<:/foreach>
<!-- save changes -->
<:save_settings "/.admin/pass">
<!--
display the current administrator list in a form suitable for editing
-->
<FORM ACTION=pass.able METHOD=POST>
<TABLE>
<TR>
<TH></TH>
<TH>Username</TH>
<TH>Password</TH>
<TH>Delete</TH>
</TR>
<:foreach name pass admins>
<TR>
<TH></TH>
<TD><:echo name></TD>
<TD><input type=password name="<:echo name>" value="<:echo pass>"></TD>
<TD><input type=checkbox name="Delete" value="<:echo name>">
</TR><:/foreach>
<TR>
<TH>Add... </TH>
<TD><input type=text name="$newname" value=""></TD>
<TD><input type=text name="$newpass" value=""></TD>
</TR>
</TABLE>
<input type=submit value="Make Changes">
</FORM>
<:else>
<h2>Your password is invalid. Please try again.</h2>
<:/ifequal>
</BODY>
</HTML>